
#ifndef __WG__H_
#define __WG__H_

enum {
	WG_Conf_Pairty,
	WG_Conf_Time,
};
	
typedef struct {
	uint8_t reverse;
	uint8_t len;
	uint8_t buf[8];
}WGBuf_T;

void WG_Init(void);
int WG_Send(const unsigned char * buf, unsigned char nBits, uint8_t parity);
void WG_Config(uint8_t conf, void* param, uint32_t size);
int Wiegand_Send(uint8_t nBits, uint8_t reverse, const uint8_t * buf, uint8_t len);
int Wiegand_SendBuf(uint8_t wgNum, WGBuf_T* wgBuf);

#endif


